<?php
class ControllerPageHome extends Controller
{
	public function index()
	{
		//Banner home
		/*$template = array(
					  'template' => "home/banner.tpl",
					  'width' => 548,
					  'height' =>548
					  );
	
		$arr = array("bannerhome",0,"",$template);
		$this->data['bannerhome'] = $this->loadModule('module/block','getList',$arr);
		//San pham moi
		$template = array(
					  'template' => "home/product.tpl",
					  'width' => 176,
					  'height' =>176
					  );*/
		
		/*$medias = $this->getProduct();
		
		$arr = array("",6,"",$template,$medias);
		$this->data['producthome'] = $this->loadModule('module/productlist','index',$arr);*/
		
		/*$arr = array("gioithieu");
		$this->data['producthome'] = $this->loadModule('module/information','index',$arr);*/
		//
		
		$template = array(
					  'template' => "home/bds.tpl",
					  'width' => 138,
					  'height' =>104
					  );
		
		
		
		$arr = array("",12,"",$template,$medias);
		$this->data['producthome'] = $this->loadModule('module/bds','getList',$arr);
		
		$template = array(
					  'template' => "home/album.tpl",
					  'width' => 150,
					  'height' =>114
					  );
	
		$arr = array("thuvienanh",0,"",$template);
		$this->data['homehinhanhmoi'] = $this->loadModule('module/block','getList',$arr);
		
		$this->loadSiteBar();
		$this->id="content";
		$this->template="page/home.tpl";
		$this->layout="layout/home";
		$this->render();
	}
	
	private function loadSiteBar()
	{
		//Left sitebar
		/*$this->data['produtcategory'] = $this->loadModule('sitebar/catalogue');
		$this->data['supportonline'] = $this->loadModule('sitebar/supportonline');
		$this->data['exchange'] = $this->loadModule('sitebar/exchange');
		$this->data['weblink'] = $this->loadModule('sitebar/weblink');
		$this->data['hitcounter'] = $this->loadModule('sitebar/hitcounter');*/
		
		//Rigth sitebar
		/*if($this->document->sitebar['login'] != "hide")
			$this->data['login'] = $this->loadModule('sitebar/login');
		$this->data['search'] = $this->loadModule('sitebar/search');
		$this->data['cart'] = $this->loadModule('sitebar/cart');
		$this->data['banner'] = $this->loadModule('sitebar/banner');
		$this->data['question'] = $this->loadModule('sitebar/question');*/
		
		$template = array(
					  'template' => "sitebar/news.tpl",
					  'width' => 100,
					  'height' =>100
					  );
		$arr = array("tintuc",5,$this->document->text['tinmoi'],$template);
		$this->data['tintuc'] = $this->loadModule('sitebar/news','index',$arr);
		
		$template = array(
					  'template' => "sitebar/services.tpl",
					  'width' => 100,
					  'height' =>100
					  );
		$arr = array("dichvu",5,"",$template);
		$this->data['dichvu'] = $this->loadModule('sitebar/news','index',$arr);
		
		$this->data['supportonline'] = $this->loadModule('sitebar/supportonline');
		$this->data['weblink'] = $this->loadModule('sitebar/weblink');
	}
	
	
	
	
	/*function getProduct()
	{
		$this->load->model('core/sitemap');
		$this->load->model('core/media');
		$siteid = $this->member->getSiteId();
		$sitemaps = $this->model_core_sitemap->getListByModule("module/product", $siteid);
		$arrsitemapid = $this->string->matrixToArray($sitemaps,"sitemapid");
		$queryoptions = array();
		$queryoptions['mediaparent'] = '%';
		$queryoptions['mediatype'] = '%';
		$options['refersitemap'] = $arrsitemapid;
		$data = $this->model_core_media->getPaginationList($options, $step=0, $to=9);
		
		return $data;
	}*/
}
?>